<%@ page language="java" pageEncoding="utf-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ include file="/WEB-INF/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <title>纳税主体信息</title>
    <%@ include file="/WEB-INF/jsp/include.jsp" %>
    <script type="text/javascript" src="/resource/common/js/common/xzqhLink.js"></script>
    <script type="text/javascript" src="${path}/resource/js/basicinfo/taxPayersInfo/common.js"></script>
    <style type="text/css">
        .numericInput {
            text-align: right;
        }
    </style>
    <script type="text/javascript">
        var path = "${path}";
        var params = new Object();

        $(function () {
            setAjaxLoading();
            new xzqhLink({
                provinceEle: $('#businessAddressProv'),
                cityEle: $('#businessAddressCity'),
                districtEle: $('#businessAddressContry')

            });
            new xzqhLink({
                provinceEle: $('#stateTaxProv'),
                cityEle: $('#stateTaxCity'),
                districtEle: $('#stateTaxArea')
            });
            new xzqhLink({
                provinceEle: $('#localTaxProv'),
                cityEle: $('#localTaxCity'),
                districtEle: $('#localTaxArea')
            });

            putCheckBoxByDb(); //设置 数据库查询的除 企业所得税，增值，生成checkbox
            init();
        });

        function init() {
            var grid=$("#shareholder");
            initGrid(grid);
        }

        //保存增加的数据
        function submit_Add() {
            if (!validform("nsztForm")) {
                $("#tab").tabs("select", 0);
                return;
            }
            if (!checkInput()) {
                return;
            }

            var param = new Object();
            param = setParam();
            if (isSave) {
                //ajax提交
                $.ajax({
                    type: "POST",
                    url: path+'/basicinfo/taxPayersInfo/save',
                    dataType: "json",
                    data: param,
                    success: function callback(data) {
                        var analyMsg = data;
                        if (analyMsg.code != '0000') {
                            $.alert("default", "error", analyMsg.msg);
                        } else {
                            $.alert("add", "info", "纳税主体信息");
                            setTimeout("closeLayer()", 100);
                        }
                    },
                    error: function (data, textstatus) {
                        $.alert("add", "error", "纳税主体信息");
                    }
                });
            }
        }

        function btnSelectHyxx(value, name) {
            layer.open({
                type: 2,
                title: ['行业信息', 'background: #38acff;'],
                shadeClose: false,
                shade: 0.3,
                area: ['450px', '500px'],
                content: path+'/basicinfo/taxPayersInfo/industryInfo',
                end: function callback() {
                    $('#industryCode').val(params.code);
                    $('#industryName').val(params.name);
                    $.parser.parse();
                }
            });

        }

        function btnSelectRelaOrg(value, name) {
            layer.open({
                type: 2,
                title: ['组织机构', 'background: #38acff;'],
                shadeClose: false,
                shade: 0.3,
                area: ['450px', '500px'],
                content: path+'/basicinfo/taxPayersInfo/relaOrg',
                end: function callback() {
                    $('#relaOrg').val(params.relaOrgname);
                    $('#orgCode').val(params.relaOrgid);
                    $.parser.parse();
                }
            });

        }

        function btnAddGdcgMx() {
            parent.btnAddGdcgMx();
        }

        function btnEditGdcgMx() {
            var row = $('#tt_gd').datagrid('getSelected');
            if (row == null) {
                $.alert("pick", "info", "明细项目");
                return;
            }
            var rowIndex = $('#tt_gd').datagrid('getRowIndex', row);
            parent.btnEditGdcgMx(rowIndex, row);
        }

        function btnDelGdcgMx() {
            var row = $('#tt_gd').datagrid('getSelected');
            if (row == null) {
                $.alert("pick", "info", "明细项目");
                return;
            }
            $.messager.alert("问题", "请确认是否要删除？","confirm", function () {

                    var index = $("#tt_gd").datagrid("getRowIndex", row);
                    if (index != -1) {
                        $("#tt_gd").datagrid("deleteRow", index);
                    }

                    fix_easyui_datagrid_scroll("tt_gd");

            });
        }

        function btnViewGdcgMx() {
            var row = $('#tt_gd').datagrid('getSelected');
            if (row == null) {
                $.alert("pick", "info", "明细项目");
                return;
            }
            parent.btnViewGdcgMx(row);
        }

        function btnAddGqgxMx() {
            parent.btnAddGqgxMx();
        }

        function btnEditGqgxMx() {
            var row = $('#tt_gq').datagrid('getSelected');
            if (row == null) {
                $.alert("pick", "info", "明细项目");
                return;
            }
            var rowIndex = $('#tt_gq').datagrid('getRowIndex', row);
            parent.btnEditGqgxMx(rowIndex, row);
        }

        function btnDelGqgxMx() {
            var row = $('#tt_gq').datagrid('getSelected');
            if (row == null) {
                $.alert("pick", "info", "明细项目");
                return;
            }

            $.messager.alert("问题", "请确认是否要删除？","alert", function () {

                    var index = $("#tt_gq").datagrid("getRowIndex", row);
                    if (index != -1) {
                        $("#tt_gq").datagrid("deleteRow", index);
                    }
                    fix_easyui_datagrid_scroll("tt_gq");

            });
        }

        function btnViewGqgxMx() {
            var row = $('#tt_gq').datagrid('getSelected');
            if (row == null) {
                $.alert("pick", "info", "明细项目");
                return;
            }
            parent.btnViewGqgxMx(row);
        }

        function checkInput() {
            var termBusiness = $("#termBusiness").val();
            if (termBusiness.length > 10) {
                $.messager.alert('提示', '经营期限最大为10个数字。', 'info', function () {
                });
                return false;
            }
            return true;
        }

        //设置保存信息
        var isSave = true;
        function setParam() {
            var param = new Object();
            param.ccode = $("#ccode").val();
            param.code = $("#code").val();
            param.name = $("#name").val();
            param.businessLicenseNo = $("#businessLicenseNo").val();
            param.industryCode = $("#industryCode").val();
            param.termBusiness = $("#termBusiness").val();
            param.regTime = $("#regTime").val();
            param.openDate = $("#openDate").val();
            param.telephone = $("#telephone").val();
            param.specificAddress = $("#specificAddress").val();
            param.depositBank = $("#depositBank").val();
            param.bankCount = $("#bankCount").val();
            param.legalRepresentative = $("#legalRepresentative").val();
            param.capitalIdCardNo = $("#capitalIdCardNo").val();
            param.financeChief = $("#financeChief").val();
            param.taxAgent = $("#taxAgent").val();
            param.agentTelephone = $("#agentTelephone").val();
            param.taxMachineType = $("#taxMachineType").val();
            param.regCapitalCurrency = $("#regCapitalCurrency").val();
            param.regCapitalAmount = $("#regCapitalAmount").val();
            param.subscribedCapitalCurrency = $("#subscribedCapitalCurrency").val();
            param.subscribedCapitalAmount = $("#subscribedCapitalAmount").val();
            param.stateTaxPhon = $("#stateTaxPhon").val();
            param.localTaxPhone = $("#localTaxPhone").val();
            param.stateTaxName = $("#stateTaxName").val();
            param.localTaxName = $("#localTaxName").val();
            param.incomeScale = $("#incomeScale").val();
            param.regType = $("#regType").val();
            param.taxpayerQualification = $("#taxpayerQualification").val();
            param.businessStatus = $("#businessStatus").val();
            param.vatLimit = $("#vatLimit").val();
            param.businessAddressProv = $("#businessAddressProv").val();
            param.businessAddressCity = $("#businessAddressCity").val();
            param.businessAddressContry = $("#businessAddressContry").val();
            param.stateTaxProv = $("#stateTaxProv").val();
            param.stateTaxCity = $("#stateTaxCity").val();
            param.stateTaxArea = $("#stateTaxArea").val();
            param.localTaxProv = $("#localTaxProv").val();
            param.localTaxCity = $("#localTaxCity").val();
            param.localTaxArea = $("#localTaxArea").val();
            param.orgCode = $("#orgCode").val();

            var tt =   $('#shareholder').datagrid("getRows");
            param.shareholderDto = JSON.stringify(tt);
            //税种鉴定参数
            //其他税种复选框
            var chk_value = getSelVal("sysz");

            var ischeck = document.all.qysds.checked;
            if (ischeck) {
                var collectTypeIncomeTax = getRadioBoxValue("collectTypeIncomeTax");//企业所得税征收方式
                var gatherTypeIncomeTax = getRadioBoxValue("gatherTypeIncomeTax"); //企业所得税汇总类别
                if (collectTypeIncomeTax != undefined && gatherTypeIncomeTax != undefined) {
                    param.collectTypeIncomeTax = collectTypeIncomeTax;
                    param.gatherTypeIncomeTax = gatherTypeIncomeTax;
                    chk_value.push(document.getElementsByName('qysds').item(0).attributes.values.nodeValue);
                } else {
                    isSave = false;
                    return $.messager.alert("错误", "请选择企业所得税征收方式及汇总类别！", "error");
                }
                //所得税申报周期选中
                var declareCycleChk = getSelVal("declareCycle");
                if(declareCycleChk.length == 0){
                    isSave = false;
                    return $.messager.alert("错误", "请选择企业所得税申报周期！", "error");
                }else{
                    param.declareCycleChk = declareCycleChk.join();
                }
            }else{
                //取消勾选 设置为空
                param.collectTypeIncomeTax = "";
                param.gatherTypeIncomeTax = "";
                param.declareCycleChk ="";
            }
            var ischeck = document.all.zzs.checked;
            if (ischeck) {
                var gatherTypeVat = getRadioBoxValue("gatherTypeVat");
                if (gatherTypeVat != undefined) {
                    param.gatherTypeVat = gatherTypeVat; //增值税汇总类别
                    chk_value.push(document.getElementsByName('zzs').item(0).attributes.values.nodeValue);
                } else {
                    isSave = false;
                    return $.messager.alert("错误", "请选择增值税汇总类别！", "error");
                }
                //增值税申报周期选中
                var declareCycleVatChk = getSelVal("declareCycleVat");
                if(declareCycleVatChk.length == 0){
                    isSave = false;
                    return $.messager.alert("错误", "请选择增值税申报周期！", "error");
                }else{
                    param.declareCycleVatChk = declareCycleVatChk.join();
                }
            }else{
                //取消勾选 设置为空
                param.gatherTypeVat = "";
                param.declareCycleVatChk = "";
            }

            if (chk_value.length == 0) {
                isSave = false;
                return $.messager.alert("错误", "请选择适用税种！", "error");
            }else{
                isSave = true;
            }
            param.taxcode = chk_value.join(); //适用税种集合
            return param;
        }

        //企业所得税触发事件
        function disQyZsDiv() {
            var ischeck = document.all.qysds.checked;
            if (ischeck) {
                document.all.qysdsLayout.style.display = "block";
                document.all.qysdsLayout2.style.display = "block";
                document.all.qysdsLayout3.style.display = "block";
            } else {
                document.all.qysdsLayout.style.display = "none";
                document.all.qysdsLayout2.style.display = "none";
                document.all.qysdsLayout3.style.display = "none";
                //取消勾选是 设为不选中
                $("input:radio[name='" + "collectTypeIncomeTax" + "']").attr('checked',false);
                $("input:radio[name='" + "gatherTypeIncomeTax" + "']").attr('checked',false);
                $("input:checkbox[name='" + "declareCycle" + "']").attr('checked',false);
            }
        }

        //增值税触发事件
        function disZzHzDiv() {
            var ischeck = document.all.zzs.checked;
            if (ischeck) {
                document.all.zzsLayout.style.display = "block";
                document.all.zzsLayout1.style.display = "block";
            } else {
                document.all.zzsLayout.style.display = "none";
                document.all.zzsLayout1.style.display = "block";
                //取消勾选是 设为不选中
                $("input:radio[name='" + "gatherTypeVat" + "']").attr('checked',false);
                $("input:checkbox[name='" + "declareCycleVat" + "']").attr('checked',false);
            }
        }

        //从数据库查询出除，营业，增值，生成checkbox
        function putCheckBoxByDb() {
            var param = new Object();
            var url = path+'/basicinfo/taxPayersInfo/listTaxCode';
            $.ajax({
                type: "POST",
                url: url,
                data: param,
                dataType: "json",
                async: false,
                success: function (data) {
                    if (data.code != '0000') {
                        $.alert("default", "info", data.msg);
                    } else {
                        var dto = data.returnObject;
                        //设置税种
                        setTaxCode(dto);
                    }
                },
                error: function () {
                    $.alert("default", "info", "获取数据时发生错误！");
                }
            });

        }

        function setTaxCode(dto) {
            var datastr = "<table style=\"width:99%;border:none;\"><tr>";
            var tdPertr = 6;
            var tdPerWid = (100 / tdPertr) + "%";
            var trs = 0;
            var taxCode = "";
            var taxName = "";
            var pTaxCode = "";

            var list = [];
            for (var i = 0; i < dto.length; i++) {
                if (dto[i].dictCode == "01") {
                } else if (dto[i].dictCode == "04") {
                } else{
                    list.push(dto[i]);
                }
            }

            if ((list.length) % tdPertr == 0) {
                trs = (list.length) / tdPertr;
            } else {
                trs = (list.length - (list.length % tdPertr)) / tdPertr + 1;
            }

            for (var i = 0; i < list.length; i++) {
                taxCode = list[i].dictCode;
                taxName = list[i].dictName;
                pTaxCode = list[i].parentDictId;
                if (i > 0 && i % tdPertr == 0) {
                    datastr += "</tr><tr>"
                }
                datastr += "<td style=\"width:" + tdPerWid + "; width: 200px\"><label style=\"background: none;\"><input type='checkbox' id='"
                    + taxCode
                    + "' name='sysz' values='"
                    + taxCode
                    + "'/>"
                    + taxName + "</label>&nbsp;&nbsp;</td>";
            }
            for (i = (list.length + 1); i <= (trs * tdPertr); i++) {
                datastr += "<td></td>"
            }
            datastr += "</tr></table>"
            document.all.otherTax.innerHTML = datastr;
        }

        //获得radio的值
        function getRadioBoxValue(radioName) {
            var radios = document.getElementsByName(radioName);
            var len = radios.length;
            var addressID;
            for (i = 0; i < radios.length; i++) {
                if (radios[i].checked) {
                    addressID = radios[i].attributes.values.nodeValue;
                }
            }
            return addressID;
        }

        //获得checkbox的值
        function getSelVal(check) {
            var oriTaxCodes = ",";
            var oriTaxNums = 0;
            var taxCodesChanged = false;
            var newCode = false;
            var chk_value = [];
            var r = document.getElementsByName(check);
            for (var i = 0; i < r.length; i++) {
                if (r[i].checked) {
                    chk_value.push(r[i].attributes.values.nodeValue);
                    if (oriTaxCodes.indexOf("," + r[i].attributes.values.nodeValue + ",") >= 0) {
                        oriTaxNums--;
                    } else {
                        newCode = true;
                    }
                }
            }
            if (newCode || oriTaxNums != 0) {
                taxCodesChanged = true;
            }

            return chk_value;
        }

        // 选择行业信息回调用函数
        function callback_selectHyxx(data) {
            params = data;
        }
        // 选择组织回调函数
        function callback_selectOrg(data) {
            params = data;
        }
        function callback(data){
            params = data;
        }
    </script>
</head>
<body style="margin:0px; padding:0px;">
<%@ include file="/WEB-INF/jsp/loading.jsp" %>
<div class="easyui-layout" fit="true">
    <div data-options="region:'center',title:'',split:false,border: false">
        <div id="tab" class="easyui-tabs" fit="true">
            <div title="基本信息" align="center" style="padding-top: 10px; padding-bottom: 10px;">
                <input type="hidden" id="id" name="id" value="">
                <form id="nsztForm" method="post">
                    <input type="hidden" id="sshyDm" name="sshyDm">
                    <table class="f_table" cellspacing="1">
                        <colgroup>
                            <col style="width:170px;"></col>
                            <col style="width:205px;"></col>
                            <col style="width:170px;"></col>
                            <col style="width:205px;"></col>
                        </colgroup>
                        <tr>
                            <td align="right" class="s_bg">
                                纳税主体：
                            </td>
                            <td align="left">
                                <input type="text" class="easyui-validatebox"
                                       data-options="required:true,validType:'length[0,50]',tipPosition:'bottom'"
                                       id="name" name="name" style="width: 200px;"/>
                            </td>
                            <td align="right" style="background: #f2f2f2 none repeat scroll 0 0;">
                                统一社会信用代码<br>纳税人识别号：
                            </td>
                            <td align="left">
                                <input type="text" class="easyui-validatebox"
                                       data-options="required:true,validType:'taxSubjectNum',tipPosition:'right'"
                                       id="code" name="code" style="width: 200px;"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" style="background: #f2f2f2 none repeat scroll 0 0;">
                                管理单位公司注册证书<br>营业执照号：
                            </td>
                            <td align="left">
                                <input type="text" id="businessLicenseNo" name="businessLicenseNo"
                                       style="width: 200px;" class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,50]',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg">
                                注册类型：
                            </td>
                            <td align="left">
                                <select id="regType" name="regType" style="width: 204px;">
                                    <c:forEach var="item" items="${regTypeList}">
                                        <option value="${item.dictCode}">${item.dictName}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                关联组织机构：
                            </td>
                            <td align="left" colspan="3">
                                <div>
                                    <ul id="tree" class="ztree" style="width: 90%; height: 90%;"></ul>
                                </div>
                                <div>
                                    <input type="hidden" id="orgCode" name="orgCode" value="">
                                    <input type="text" id="relaOrg" name="relaOrg" style="width: 550px;"
                                           class="easyui-validatebox" readonly="readonly" data-options="required:true"/>
                                    <span id="btn_selOrg" class="searchbox-button"
                                          style="height: 20px; margin-top: 5px;"
                                          onclick="btnSelectRelaOrg()"></span>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                收入规模：
                            </td>
                            <td align="left">
                                <select id="landTaxScale" name="landTaxScale" style="width: 204px;">
                                    <c:forEach var="item" items="${incomeScaleList}">
                                        <option value="${item.dictCode}">${item.dictName}</option>
                                    </c:forEach>
                                </select>
                            </td>
                            <td align="right" class="s_bg">
                                纳税人资质：
                            </td>
                            <td align="left">
                                <select id="taxpayerQualification" name="taxpayerQualification" style="width: 204px;">
                                    <c:forEach var="item" items="${taxpayerQualificationList}">
                                        <option value="${item.dictCode}">${item.dictName}</option>
                                    </c:forEach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                注册日期：
                            </td>
                            <td align="left">
                                <input type="text" id="regTime" name="regTime" class="Wdate" style="width: 200px;"
                                       onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/>
                            </td>
                            <td align="right" class="s_bg">
                                开业日期：
                            </td>
                            <td align="left">
                                <input type="text" id="openDate" name="openDate" class="Wdate" style="width: 200px;"
                                       onFocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:true})"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                经营期限：
                            </td>
                            <td align="left">
                                <input type="text" id="termBusiness" name="termBusiness" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'posInteger',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg">
                                营业状态：
                            </td>
                            <td align="left">
                                <select id="businessStatus" name="businessStatus" style="width:204px;">
                                    <option value="1">营业</option>
                                    <option value="0">停业</option>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                生产经营地址：
                            </td>
                            <td align="left" colspan="2" class="s_bg">
                                <select id="businessAddressProv" name="businessAddressProv"
                                        style="width: 120px;"></select>
                                <select id="businessAddressCity" name="businessAddressCity"
                                        style="width: 120px;"></select>
                                <select id="businessAddressContry" name="businessAddressContry"
                                        style="width: 120px;"></select>
                            </td>
                            <td align="left">
                                <input type="text" id="specificAddress" name="specificAddress" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,250]',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                所属行业：
                            </td>
                            <td align="left" style="width: 150px;">
                                <input type="hidden" id="industryCode" name="industryCode" value="">
                                <input type="text" id="industryName" name="industryName" style="width: 150px;"
                                       class="easyui-validatebox" readonly="readonly" data-options="required:false"/>
                                <span id="btn_selHyxx" class="searchbox-button" style="height: 20px; margin-top: 5px;"
                                      onclick="btnSelectHyxx()"></span>
                            </td>
                            <td align="right" class="s_bg">
                                办公电话：
                            </td>
                            <td align="left">
                                <input type="text" id="telephone" name="telephone" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'telphone',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg" colspan="2"></td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                开户银行：
                            </td>
                            <td align="left">
                                <input type="text" id="depositBank" name="depositBank" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,127]',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg">
                                银行账号：
                            </td>
                            <td align="left">
                                <input type="text" id="bankCount" name="bankCount" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'bankNumber',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                法定代表人：
                            </td>
                            <td align="left">
                                <input type="text" id="legalRepresentative" name="legalRepresentative"
                                       style="width: 200px;" class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,25]',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg">
                                法人代表身份证号码：
                            </td>
                            <td align="left">
                                <input type="text" id="capitalIdCardNo" name="capitalIdCardNo" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'idCard',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                财务负责人：
                            </td>
                            <td align="left">
                                <input type="text" id="financeChief" name="financeChief" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,25]',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg" colspan="2"></td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                税务经办人：
                            </td>
                            <td align="left">
                                <input type="text" id="taxAgent" name="taxAgent" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,25]',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg">
                                经办人电话：
                            </td>
                            <td align="left">
                                <input type="text" id="agentTelephone" name="agentTelephone" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'telphone',tipPosition:'right'"/>

                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                增值税专用发票最高限额：
                            </td>
                            <td align="left">
                                <select id="vatLimit" name="vatLimit" style="width: 204px;">
                                    <c:forEach var="item" items="${vatLimitList}">
                                        <option value="${item.dictCode}">${item.dictName}</option>
                                    </c:forEach>
                                </select>
                            </td>
                            <td align="right" class="s_bg">
                                税控机类型：
                            </td>
                            <td align="left">
                                <input type="text" id="taxMachineType" name="taxMachineType" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,16]',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                注册资本原币币别：
                            </td>
                            <td align="left">
                                <input type="text" id="regCapitalCurrency" name="regCapitalCurrency"
                                       style="width: 200px;" class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,25]',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg">
                                注册资本原币金额(万元)：
                            </td>
                            <td align="left">
                                <input type="text" id="regCapitalAmount" name="regCapitalAmount" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'posInteger',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                实收资本原币币别：
                            </td>
                            <td align="left">
                                <input type="text" id="subscribedCapitalCurrency" name="subscribedCapitalCurrency"
                                       style="width: 200px;" class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,25]',tipPosition:'right'"/>
                            </td>
                            <td align="right" class="s_bg">
                                实收资本原币金额(万元)：
                            </td>
                            <td align="left">
                                <input type="text" id="subscribedCapitalAmount" name="subscribedCapitalAmount"
                                       style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'posInteger',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                主管国税机关：
                            </td>
                            <td align="left" colspan="2" class="s_bg">
                                <select id="stateTaxProv" name="stateTaxProv" style="width: 120px;"></select>
                                <select id="stateTaxCity" name="stateTaxCity" style="width: 120px;"></select>
                                <select id="stateTaxArea" name="stateTaxArea" style="width: 120px;"></select>
                            </td>
                            <td align="left">
                                <input type="text" id="stateTaxName" name="stateTaxName" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,100]',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                联系电话：
                            </td>
                            <td align="left" colspan="3">
                                <input type="text" id="stateTaxPhon" name="stateTaxPhon" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'telphone',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                主管地税机关：
                            </td>
                            <td align="left" colspan="2" class="s_bg">
                                <select id="localTaxProv" name="localTaxProv" style="width: 120px;"></select>
                                <select id="localTaxCity" name="localTaxCity" style="width: 120px;"></select>
                                <select id="localTaxArea" name="localTaxArea" style="width: 120px;"></select>
                            </td>
                            <td align="left">
                                <input type="text" id="localTaxName" name="localTaxName" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'length[0,100]',tipPosition:'right'"/>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="s_bg">
                                联系电话：
                            </td>
                            <td align="left" colspan="3">
                                <input type="text" id="localTaxPhone" name="localTaxPhone" style="width: 200px;"
                                       class="easyui-validatebox"
                                       data-options="required:false,validType:'telphone',tipPosition:'right'"/>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
            <div title="税种鉴定" style="padding-top: 10px; padding-bottom: 10px;">
                <table align="left" style="font-size: 20px">
                    <tr>
                        <td style="text-align: right;" class="td_blue_txt">&nbsp;</td>
                        <td colspan="5" class="td_grey">
                            <table style="border: 0;">
                                <tr>
                                    <td><label style="background: none;"><input type="checkbox" id="qysds" name="qysds"
                                                                                values="04" onclick="disQyZsDiv()"/>企业所得税</label>
                                    </td>
                                </tr>
                                <tr id="qysdsLayout" style="display: none">
                                    <td style="text-align: right;" class="td_blue_txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;征收方式：&nbsp;</td>
                                    <td colspan="5" class="td_grey">
                                        <label style="background: none;"><input type="radio" id="inComeCzzs"
                                                                                name="collectTypeIncomeTax"
                                                                                values="10"/>查账征收</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="inComeHdzs"
                                                                                name="collectTypeIncomeTax"
                                                                                values="50"/>核定征收</label>&nbsp;&nbsp;
                                    </td>
                                </tr>
                                <tr id="qysdsLayout2" style="display: none">
                                    <td style="text-align: right;" class="td_blue_txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;汇总类别：&nbsp;</td>
                                    <td colspan="5" class="td_grey">
                                        <label style="background: none;"><input type="radio" id="inComeDlns"
                                                                                name="gatherTypeIncomeTax"
                                                                                values="01"/>独立申报</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="inComeZjg"
                                                                                name="gatherTypeIncomeTax"
                                                                                values="02"/>汇总申报</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="inComeFjg"
                                                                                name="gatherTypeIncomeTax"
                                                                                values="03"/>被汇总申报</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="inComeFdl"
                                                                                name="gatherTypeIncomeTax"
                                                                                values="05"/>非单独纳税</label>&nbsp;&nbsp;&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="inComeWhc"
                                                                                name="gatherTypeIncomeTax"
                                                                                values="04"/>外汇总</label>&nbsp;&nbsp;

                                    </td>
                                </tr>
                                <tr id="qysdsLayout3" style="display: none">
                                    <td style="text-align: right;" class="td_blue_txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;申报周期：&nbsp;&nbsp;</td>
                                    <td colspan="5" class="td_grey">
                                        <label style="background: none;"><input type="checkbox" id="declareCycleMonth" name="declareCycle" values="01" />月</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="checkbox" id="declareCycleQuarter" name="declareCycle" values="03" />季</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="checkbox" id="declareCycleYear" name="declareCycle" values="12" />年</label>&nbsp;&nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;" class="td_blue_txt">
                            &nbsp;
                        </td>
                        <td colspan="5" class="td_grey">
                            <table style="border: 0;">
                                <tr>
                                    <td><input type="checkbox" id="zzs" name="zzs" values="01" onclick="disZzHzDiv()"/>增值税
                                    </td>
                                </tr>
                                <tr id="zzsLayout" style="display: none">
                                    <td style="text-align: right;" class="td_blue_txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;汇总类别：&nbsp;</td>
                                    <td colspan="5" class="td_grey">
                                        <label style="background: none;"><input type="radio" id="zzsDlns"
                                                                                name="gatherTypeVat"
                                                                                values="01"/>独立申报</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="zzsZjg"
                                                                                name="gatherTypeVat"
                                                                                values="02"/>汇总申报</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="zzsFjg"
                                                                                name="gatherTypeVat"
                                                                                values="03"/>被汇总申报</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="zzsFdl"
                                                                                name="gatherTypeVat"
                                                                                values="05"/>非单独纳税</label>&nbsp;&nbsp;&nbsp;&nbsp;
                                        <label style="background: none;"><input type="radio" id="zzsWhc"
                                                                                name="gatherTypeVat"
                                                                                values="04"/>外汇总</label>&nbsp;&nbsp;
                                    </td>
                                </tr>
                                <tr id="zzsLayout1" style="display: none">
                                    <td style="text-align: right;" class="td_blue_txt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;申报周期：&nbsp;&nbsp;</td>
                                    <td colspan="5" class="td_grey">
                                        <label style="background: none;"><input type="checkbox" id="declareCycleMonthVat" name="declareCycleVat" values="01" />月</label>&nbsp;&nbsp;
                                        <label style="background: none;"><input type="checkbox" id="declareCycleQuarterVat" name="declareCycleVat" values="03" />季</label>&nbsp;&nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right;" class="td_blue_txt">&nbsp;</td>
                        <td colspan="5" class="td_grey" id="otherTax">
                        </td>
                    </tr>
                </table>
            </div>
            <div title="股东信息" style="padding-top: 10px; padding-bottom: 10px;">
                <table id="shareholder" title="" border="true"></table>
            </div>
            <div id="tb" style="padding: 1px; height: auto; display: none;">
                <div>
                    <a id="btn_add_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add" plain="false" onclick="BatchAdd()">新增</a>
                    <a id="btn_edit_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit" plain="false" onclick="Edit()">修改</a>
                    <a id="btn_del_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-remove" plain="false" onclick="Del()">删除</a>
                </div>
            </div>
        </div>
    </div>
    <div data-options="region:'south',title:'',split:false,border: false" style="height:55px;">
        <div align="center" style="margin-top: 15px;">
            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-ok" onclick="submit_Add()">确定</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel" onclick="closeLayer();">取消</a>
        </div>
    </div>
</div>
<div id="tb_gd" style="padding: 1px; height: auto; display: none;">
    <div>
        <a id="btn_gd_add_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add" plain="true"
           onclick="btnAddGdcgMx()">新增</a>
        <a id="btn_gd_edit_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit" plain="true"
           onclick="btnEditGdcgMx()">修改</a>
        <a id="btn_gd_del_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-remove" plain="true"
           onclick="btnDelGdcgMx()">删除</a>
        <a id="btn_gd_view_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-search" plain="true"
           onclick="btnViewGdcgMx()">查看</a>
    </div>
</div>
<div id="tb_gq" style="padding: 1px; height: auto; display: none;">
    <div>
        <a id="btn_gq_add_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add" plain="true"
           onclick="btnAddGqgxMx()">新增</a>
        <a id="btn_gq_edit_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit" plain="true"
           onclick="btnEditGqgxMx()">修改</a>
        <a id="btn_gq_del_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-remove" plain="true"
           onclick="btnDelGqgxMx()">删除</a>
        <a id="btn_gq_view_tb" href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-search" plain="true"
           onclick="btnViewGqgxMx()">查看</a>
    </div>
</div>
</body>
</html>
